<template>
  <div v-if="getShowBuyCard && getVeekrayStatus === 1 && !checkOwner && getCustomerId" class="back-my-shop box-shadow fixed-btn">
    <button class="button-icon" @click="backShop">
      <div class="font-11">
        <p>回我</p>
        <p>店铺</p>
      </div>
    </button>
  </div>
</template>

<script>
  import {setMemberId} from '@/utils/auth'

  export default {
    data() {
      return {}
    },
    props: {
      urlFrom: {
        type: String,
        default: ''
      }
    },
    onShow() {},
    methods: {
      backShop() {
        this.$pt.removeStorageSync('otherShop')
        this.$pt.setStorageSync('personalType', 1)
        this.$utils.setMyId(this.getCustomerId)
        setMemberId(this.getCustomerId)
        this.$root.$mp.appOptions.query = {}
        if (this.getCurrentPage().page.route === 'pages/shop/detail/main') {
          this.$pt.reLaunch({url: '/pages/home/main'})
          return
        }
        this.$pt.reLaunch({url: '/' + this.getCurrentPage().page.route})
      }
    }
  }
</script>

<style scoped lang="less">
  // 返回我的店铺按钮
  .back-my-shop {
    background: linear-gradient(90deg, #00b3f5, #0079f7);
    border-radius: 100px;
    width: 48px;
    height: 48px;
    text-align: center;
    margin-bottom: 13px;
    .button-icon{
      color: #fff;
      height: 48px;
      line-height: 1.2;
      display: flex;
      justify-content: center;
      align-items: center;
    }
  }
</style>
